﻿var com = com || {};
com.viewModel = com.viewModel || {};
com.viewModel.pure = function (data) {
    var self = this;
    data = data == null ? {} : data;
    data.dataSource = data.dataSource || {};
    data.dataSource.pageData = data.dataSource.pageData || {};
    this.idField = data.idField || "ID";
    this.urls = data.urls || {};
    this.resx = data.resx || {};
    this.dataSource = data.dataSource;
    this.actions = data.actions || {};
    this.data = ko.mapping.fromJS(data.data);
    this.form = ko.mapping.fromJS(data.form);
    this.pageData = ko.mapping.fromJS(data.dataSource.pageData);

    this.searchClick = function () {

    };

    this.refreshClick = function () {

    };
};